package com.system.connect.springboot_flowers.mapper;

import com.system.connect.springboot_flowers.entity.Tools;
import com.system.connect.springboot_flowers.entity.UserAddress;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 用户收货地址表 Mapper 接口
 * </p>
 *
 * @author yang
 * @since 2025-03-22
 */
@Mapper
public interface UserAddressMapper extends BaseMapper<UserAddress>{
    List<UserAddress> selectByUserId(@Param("userId") Long userId);

    UserAddress selectById(@Param("id") Long id);

    int insert(UserAddress address);

    int updateById(UserAddress address);

    int deleteById(@Param("id") Long id);

    int clearDefaultAddress(@Param("userId") Long userId);
}
